<?

  ob_start();
  header('content-type: text/html; charset=utf-8');
  profile_point('- page start');

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <base href="<?= $config['site.base'] ?>">
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <link type="text/css" rel="stylesheet" href="themes/default/default.css"/>
    <title><?= $doctitle ?></title>
  <?= implode(' ', $config['pageheaders']) ?>
  </head>
  <body>
    <script type="text/javascript" src="custom/ajax.js"></script>
    <div id="container">
      <div id="accountmenu">
        #
      </div>

	  <div id="topmenu"><? 
        foreach ($config['menu'] as $item) { ?>
        <a <?= $item['style'] ?> href="<?= $item['url'] ?>"><?= $item['caption'] ?></a>
      <? } 
        profile_point('- account menu');
      ?></div>
      <h1>
        <?= getDefault($config['pagetitle'], $config['site.name']) ?>
      </h1>
      <div id="content">
        <?= $content ?>
        <? profile_point('- content'); ?>
    </div>
    <script type="text/javascript" src="custom/skinnytip.js"></script>
    
  </body>
</html><?
 
  profile_point('- end');
  print(ob_get_clean());
  profile_point('- write out buffer');
?>
